namespace GeneXus.Programs {
   using System;
   using System.Collections;
   using GeneXus.Utils;
   using GeneXus.Resources;
   using GeneXus.Application;
   using GeneXus.Metadata;
   using com.genexus;
   using com.genexus.ui;
   using com.genexus.uifactory;
   using GeneXus.Windows;
   using System.Data;
   using System.Data.SqlClient;
   using GeneXus.Data;
   using GeneXus.Data.FAT;
   using GeneXus.XML;
   using GeneXus.Encryption;
   using GeneXus.Http.Client;
   public class subwmntarea10 : GXSubfileElement
   {
      private short VSel ;
      private short AreCod ;
      private String AreNom ;
      private String AreEst ;
      private DateTime AreFCR ;
      private String AreHCR ;
      private String AreUCR ;
      private DateTime AreFUM ;
      private String AreHUM ;
      private String AreUUM ;
      public short getVSel( )
      {
         return VSel ;
      }

      public void setVSel( short value )
      {
         VSel = value;
      }

      public short getAreCod( )
      {
         return AreCod ;
      }

      public void setAreCod( short value )
      {
         AreCod = value;
      }

      public String getAreNom( )
      {
         return AreNom ;
      }

      public void setAreNom( String value )
      {
         AreNom = value;
      }

      public String getAreEst( )
      {
         return AreEst ;
      }

      public void setAreEst( String value )
      {
         AreEst = value;
      }

      public DateTime getAreFCR( )
      {
         return AreFCR ;
      }

      public void setAreFCR( DateTime value )
      {
         AreFCR = value;
      }

      public String getAreHCR( )
      {
         return AreHCR ;
      }

      public void setAreHCR( String value )
      {
         AreHCR = value;
      }

      public String getAreUCR( )
      {
         return AreUCR ;
      }

      public void setAreUCR( String value )
      {
         AreUCR = value;
      }

      public DateTime getAreFUM( )
      {
         return AreFUM ;
      }

      public void setAreFUM( DateTime value )
      {
         AreFUM = value;
      }

      public String getAreHUM( )
      {
         return AreHUM ;
      }

      public void setAreHUM( String value )
      {
         AreHUM = value;
      }

      public String getAreUUM( )
      {
         return AreUUM ;
      }

      public void setAreUUM( String value )
      {
         AreUUM = value;
      }

      public override void clear( )
      {
         VSel = 0 ;
         AreCod = 0 ;
         AreNom = "" ;
         AreEst = "" ;
         AreFCR = DateTime.MinValue ;
         AreHCR = "" ;
         AreUCR = "" ;
         AreFUM = DateTime.MinValue ;
         AreHUM = "" ;
         AreUUM = "" ;
      }

      public override int compareTo( GXSubfileElement element ,
                                     int column )
      {
         switch (column)
         {
               case 0 :
                  if ( VSel > ((subwmntarea10) element).getVSel() ) return 1;
                  if ( VSel < ((subwmntarea10) element).getVSel() ) return -1;
                  return 0;
               case 1 :
                  if ( AreCod > ((subwmntarea10) element).getAreCod() ) return 1;
                  if ( AreCod < ((subwmntarea10) element).getAreCod() ) return -1;
                  return 0;
               case 2 :
                  return GXutil.strcmp( GXutil.upper( AreNom ), GXutil.upper( ((subwmntarea10) element).getAreNom() ));
               case 3 :
                  return GXutil.strcmp( GXutil.upper( AreEst ), GXutil.upper( ((subwmntarea10) element).getAreEst() ));
               case 4 :
                  return GXutil.datecmp( GxConvert.AnyDateToJDate(AreFCR) , GxConvert.AnyDateToJDate(((subwmntarea10) element).getAreFCR()) );
               case 5 :
                  return GXutil.strcmp( GXutil.upper( AreHCR ), GXutil.upper( ((subwmntarea10) element).getAreHCR() ));
               case 6 :
                  return GXutil.strcmp( GXutil.upper( AreUCR ), GXutil.upper( ((subwmntarea10) element).getAreUCR() ));
               case 7 :
                  return GXutil.datecmp( GxConvert.AnyDateToJDate(AreFUM) , GxConvert.AnyDateToJDate(((subwmntarea10) element).getAreFUM()) );
               case 8 :
                  return GXutil.strcmp( GXutil.upper( AreHUM ), GXutil.upper( ((subwmntarea10) element).getAreHUM() ));
               case 9 :
                  return GXutil.strcmp( GXutil.upper( AreUUM ), GXutil.upper( ((subwmntarea10) element).getAreUUM() ));
         }
         return 0;
      }

      public override bool isEmpty( )
      {
         return ( ( VSel == 0 ) && ( AreCod == 0 ) && ( String.Compare(AreNom.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( String.Compare(AreEst.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( AreFCR == DateTime.MinValue ) && ( String.Compare(AreHCR.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( String.Compare(AreUCR.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( AreFUM == DateTime.MinValue ) && ( String.Compare(AreHUM.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) && ( String.Compare(AreUUM.TrimEnd(' '), "".TrimEnd(' ') ) == 0 ) )  ;
      }

      public override void setColumn( GXComponent cell ,
                                      int field )
      {
         switch (field) {
            case 0 :
               cell.setValue( VSel );
               break;
            case 1 :
               cell.setValue( AreCod );
               break;
            case 2 :
               cell.setValue( AreNom );
               break;
            case 3 :
               cell.setValue( AreEst );
               break;
            case 4 :
               cell.setValue( GxConvert.AnyDateToJDate(AreFCR) );
               break;
            case 5 :
               cell.setValue( AreHCR );
               break;
            case 6 :
               cell.setValue( AreUCR );
               break;
            case 7 :
               cell.setValue( GxConvert.AnyDateToJDate(AreFUM) );
               break;
            case 8 :
               cell.setValue( AreHUM );
               break;
            case 9 :
               cell.setValue( AreUUM );
               break;
         }
      }

      public bool isFieldChanged( GXComponent cell ,
                                  int field )
      {
         switch (field) {
            case 0 :
               return ( (((GUIObjectShort) cell).getValue() == VSel) );
            case 1 :
               return ( (((GUIObjectShort) cell).getValue() == AreCod) );
            case 2 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),AreNom) == 0) );
            case 3 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),AreEst) == 0) );
            case 4 :
               return ( (((GUIObjectDatetime) cell).getValue().Equals(GxConvert.AnyDateToJDate(AreFCR))) );
            case 5 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),AreHCR) == 0) );
            case 6 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),AreUCR) == 0) );
            case 7 :
               return ( (((GUIObjectDatetime) cell).getValue().Equals(GxConvert.AnyDateToJDate(AreFUM))) );
            case 8 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),AreHUM) == 0) );
            case 9 :
               return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),AreUUM) == 0) );
         }
         return false;
      }

      public override void setField( int i ,
                                     GXComponent value )
      {
         switch (i)
         {
               case 0 :
                  VSel = value.getShortValue() ;
                  break;
               case 1 :
                  AreCod = value.getShortValue() ;
                  break;
               case 2 :
                  AreNom = value.getStringValue() ;
                  break;
               case 3 :
                  AreEst = value.getStringValue() ;
                  break;
               case 4 :
                  AreFCR = GxConvert.AnyDateToDateTime(value.getDateValue()) ;
                  break;
               case 5 :
                  AreHCR = value.getStringValue() ;
                  break;
               case 6 :
                  AreUCR = value.getStringValue() ;
                  break;
               case 7 :
                  AreFUM = GxConvert.AnyDateToDateTime(value.getDateValue()) ;
                  break;
               case 8 :
                  AreHUM = value.getStringValue() ;
                  break;
               case 9 :
                  AreUUM = value.getStringValue() ;
                  break;
         }
      }

      public override void setField( int i ,
                                     GXSubfileElement element )
      {
         switch (i)
         {
               case 0 :
                  VSel = ((subwmntarea10) element).VSel;
                  return;
               case 1 :
                  AreCod = ((subwmntarea10) element).AreCod;
                  return;
               case 2 :
                  AreNom = ((subwmntarea10) element).AreNom;
                  return;
               case 3 :
                  AreEst = ((subwmntarea10) element).AreEst;
                  return;
               case 4 :
                  AreFCR = ((subwmntarea10) element).AreFCR;
                  return;
               case 5 :
                  AreHCR = ((subwmntarea10) element).AreHCR;
                  return;
               case 6 :
                  AreUCR = ((subwmntarea10) element).AreUCR;
                  return;
               case 7 :
                  AreFUM = ((subwmntarea10) element).AreFUM;
                  return;
               case 8 :
                  AreHUM = ((subwmntarea10) element).AreHUM;
                  return;
               case 9 :
                  AreUUM = ((subwmntarea10) element).AreUUM;
                  return;
         }
      }

   }

}
